<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const AuthTag = {
            Home: 1,
            Login: 1<<1,
            Menu1: 1<<2,
            Menu2: 1<<3,
            Menu3: 1<<4,
            Menu4: 1<<5,
            Menu5: 1<<6,
            Menu6: 1<<7,
            Menu7: 1<<8,
        };
        var a = ['Home', 'Menu1', 'Menu2', 'Menu3'];
        let authNum = a.reduce((prev, next) => AuthTag[next] + prev, 0);
        Object.keys(AuthTag).forEach(tag => {
            console.log(authNum, AuthTag[tag], authNum&AuthTag[tag]);
        })
    </script>
</body>
</html>